package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.AssessmentStudy;
import com.zhijian.medical.entity.vo.request.AssessmentStudySearchVo;
import com.zhijian.medical.entity.vo.response.AssessmentListVo;
import com.zhijian.medical.entity.vo.response.AssessmentStudyVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AssessmentStudyMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据考核id进行删除
     *
     * @param assessmentId
     * @return
     */
    int deleteByAssessmentId(Long assessmentId);

    /**
     * 根据学习模块id进行删除
     *
     * @param studyId
     * @return
     */
    int deleteByStudyId(Long studyId);

    int insert(AssessmentStudy record);

    int insertSelective(AssessmentStudy record);

    AssessmentStudy selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AssessmentStudy record);

    int updateByPrimaryKey(AssessmentStudy record);

    int count(AssessmentStudySearchVo assessmentStudySearchVo);

    List<AssessmentStudyVo> selectList(AssessmentStudySearchVo assessmentStudySearchVo);

    AssessmentStudyVo selectVoById(Long id);

    int insertBatch(@Param("entities") List<AssessmentStudy> entities);

    /**
     * 根据学习模块查询考核列表
     *
     * @param studyId
     * @return
     */
    List<AssessmentListVo> selectAssessmentListByStudyId(Long studyId);

    /**
     * 查询出一个考核的关联学习资料名称
     *
     * @param assessmentId
     * @return
     */
    String selectStudyNamesByAssessmentId(Long assessmentId);
}